home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 49
/
Amiga Format CD49 (2000-01-17)(Future Publishing)(GB)(Track 1 of 3)[!][issue 2000-02].iso
/
-websites-
/
wirenet
/
files
/
dashboard2.lha
/
Dashboard2
/
UpdateWirenet
< prev
next >
Wrap
Text File
|
1998-04-23
|
11KB
|
351 lines
; $VER: UpdateWirenet 2.0 (23.3.98)
;
; This installer and the accompanying scripts are
; (c) Neil Bothwick, Wirenet Amiga Internet and may
; not be used in any other package without permission
; This updates a Wirenet 1.5/1.51 installation to the new Dashboard2 setup
; If you do not already have Wirenet 1.5 installed you should download and
; install this first.
; It is available from http://www.wirenet.u-net.com/updates.html
;========================== Define Procedures ==========================
(set ArcName 'Dashboard2.lha')
;;; Abort with message
(procedure GetOut GetOutMsg
(message GetOutMsg)
(exit (quiet))
)
;;;
;;; Setup message strings
(set
NoArexxMsg
(cat
'\nThe update cannot proceed without Rexxmast running.\n\n'
'You should have Arexx active on your system at all times, please drag '
'the rexxmast icon from your System drawer to WBStartup and reboot'
)
BadArrexMsg
(cat
'\nThe execution of an Arexx script failed\n'
NoArexxMsg
)
IntroMsg
(cat
'\nHello ' (getenv 'REALNAME') '\n\n'
'This will update your Wirenet software to the latest current setup. '
'This uses a new GUI with a preferences editor for altering most settings\n\n'
'It also has several other new features, read the documentation for more information.\n\n'
'The installer will copy your previous files to a directory called Old, '
'in case you should need to revert to them for any reason.'
)
Already2Msg
(cat
'\nYou appear to have a version of Dashboard 2 installed already.\n\n'
'Do you want to update it or uninstall it?'
)
Already2Help
(cat
'\n"Update" will update your Dashboard 2 installation to the latest versions.'
'\n\n"Uninstall" will restore the Dashboard 1.5 files that were backed up '
'when you updated to Dashboard 2'
)
OldDBMsg
(cat
'\nThis installer will only update from Dashboard 1.5 or 1.51\n\n'
'If you do not already have Wirenet 1.5 installed you should '
'download and install 1.51 first.\n\n'
'It is available from http://www.wirenet.u-net.com/updates.html'
)
ConvertConfigMsg
(cat
'\nDashboard2 uses a different method of storing your account and '
'configuration details. Before copying any files, the installer '
'will read your current details and create a new configuration file.\n\n'
'You will be able to edit these settings by selecting the "Prefs" menu item in Dashboard.'
)
FinalMsg
(cat
'\nYour Wirenet software has been updated to Dashboard2.\n\n'
'There are several significant differences in the way it operates, '
'you will only benefit from these improvements if you take a few '
'minutes to read the documentation.'
)
OldLibMsg
(cat
'\nAn old version of a library was found. This has been updated but '
'you MUST reset your Amiga before proceeding with the installation '
'of Dashboard2'
)
OldLibHelp
(cat
'\nSelect "Reset Now" to reboot your machine, or "Exit" to leave it '
'until later. You MUST not run the installer until after you have '
'reset your Amiga.'
)
)
;;;
;;; Check archive was unarced correctly
(procedure CheckUnarc
(if (= 0 (exists 'AmiTCP/Dashboard'))
(GetOut
(cat
'\n' ArcName 'has not been unarchived correctly!\n\n'
'Type\n\n"lha x ' ArcName ' RAM:"\n\nin a shell and then '
'double click on the installer icon in RAM:'
)
)
)
)
;;;
;;; Check arexx is running
(procedure CheckArexx
(if (run 'rx "address command"')
(if (run 'sys:rexxc/rx "address command"')
(GetOut NoArexxMsg)
)
)
)
;;;
;;; Make environment variable
(procedure SetEnv EnvName EnvVal ; Creates environment variables in ENV: and ENVARC:
(textfile
(dest (tackon 'ENVARC:' EnvName))
(append EnvVal)
)
(textfile
(dest (tackon 'ENV:' EnvName))
(append EnvVal)
)
)
;;;
;;; Backup file
(procedure Backup BakSrc BakDest
(if (exists BakSrc)
(copyfiles
(prompt (cat 'Backing up existing files to ' BakDest))
(help '')
(source BakSrc)
(dest BakDest)
(nogauge)
)
)
)
;;;
(CheckUnarc) ; ensure archive was unpacked with paths preserved
(CheckArexx)
(welcome)
;=========================== Install Update ===========================
;;; Introduction
(message IntroMsg)
;;;
;;; Get install path
(set InstallPath (expandpath 'AmiTCP:'))
(makeassign 'Wirenet' InstallPath)
(set @default-dest InstallPath)
;;;
;;; Check version of current installation
(set vernum (getversion 'Wirenet:Dashboard'))
(set ver (/ vernum 65536))
(set rev (- vernum (* ver 65536)))
(set Update2 0)
(if (= ver 2)
(
(if (askbool
(prompt Already2Msg)
(help Already2Help)
(choices 'Update' 'Uninstall')
)
; Update Dashboard 2
(set Update2 1)
; Uninstall and restore Dashboard 1.5
(
(run ';copy >NIL: AmiTCP:old/Dash#? AmiTCP: clone quiet')
(run ';copy >NIL: AmiTCP:old/bin AmiTCP:bin clone quiet')
(run ';copy >NIL: AmiTCP:old/envarc ENVARC: all clone quiet')
(exit '\nDashboard 1.5 reinstalled' (quiet))
)
)
)
)
(if (and (<> '1.5' (cat ver '.' rev)) (= Update2 0))
(GetOut OldDBMsg)
)
;;;
;;; Check version of rexxdossupport.library
(if (= 1 (exists 'libs:rexxdossupport.library'))
(if (= 5 (run 'version rexxdossupport.library 3 5'))
(set OldLib 1)
(set OldLib 0)
)
)
;;;
;;; Install libraries
(working 'Installing libraries')
(set LibsPath (tackon (pathonly @icon) 'Libs'))
(foreach LibsPath '#?'
(copylib
(prompt 'Updating libraries')
(help '')
(source (tackon LibsPath @each-name))
(dest 'LIBS:')
(nogauge)
)
)
;;;
;;; Reboot if old library found
(if (= 1 OldLib)
(if (askbool
(prompt OldLibMsg)
(help OldLibHelp)
(choices 'Reset Now' 'Exit')
)
(
(working '\nPlease wait while I reset.')
(run 'wait 10')
(run 'reset')
)
(exit '\nYou MUST reboot your Amiga before running the installer again' (quiet))
)
)
;;;
;;; Convert configuration
(if (= 0 Update2)
(
(message ConvertConfigMsg)
(working 'Converting your configuration information to new format')
(run 'rx AmiTCP/bin/AddLibs')
(run 'rx AmiTCP/bin/WirenetPrefs CONVERT')
)
)
;;;
;;; Backup old files
(if (= 0 Update2)
(
(message 'Backing up current files to Internet/Old')
(working 'Backing up current files to Internet/Old')
(Backup 'Wirenet:Dashboard' 'Wirenet:Old')
(Backup 'Wirenet:Dashboard.gui' 'Wirenet:Old')
(Backup 'Wirenet:Dashboard.info' 'Wirenet:Old')
(foreach 'AmiTCP/bin' '#?'
(Backup (tackon 'Wirenet:bin' @each-name) 'Wirenet:Old/bin')
)
(Backup 'ENVARC:DOMAINNAME' 'Wirenet:Old/envarc')
(Backup 'ENVARC:FTPDIR' 'Wirenet:Old/envarc')
(Backup 'ENVARC:FTPREADME' 'Wirenet:Old/envarc')
(Backup 'ENVARC:FTPSERVER' 'Wirenet:Old/envarc')
(Backup 'ENVARC:HOST' 'Wirenet:Old/envarc')
(Backup 'ENVARC:HOSTNAME' 'Wirenet:Old/envarc')
(Backup 'ENVARC:IPADDRESS' 'Wirenet:Old/envarc')
(Backup 'ENVARC:MAILBOX' 'Wirenet:Old/envarc')
(Backup 'ENVARC:MAILSERVER' 'Wirenet:Old/envarc')
(Backup 'ENVARC:MAILSERVERIP' 'Wirenet:Old/envarc')
(Backup 'ENVARC:NEWSSERVER' 'Wirenet:Old/envarc')
(Backup 'ENVARC:NEWSSERVERIP' 'Wirenet:Old/envarc')
(Backup 'ENVARC:NNTPSERVER' 'Wirenet:Old/envarc')
(Backup 'ENVARC:NODENAME' 'Wirenet:Old/envarc')
(Backup 'ENVARC:SMTPSERVER' 'Wirenet:Old/envarc')
(Backup 'ENVARC:USER' 'Wirenet:Old/envarc')
(Backup 'ENVARC:USERNAME' 'Wirenet:Old/envarc')
(Backup 'ENVARC:Wirenet.prefs' 'Wirenet:Old/envarc')
(foreach 'ENVARC:Wirenet' '#?'
(Backup (tackon 'ENVARC:Wirenet' @each-name) 'Wirenet:Old/envarc/Wirenet')
)
)
)
;;;
;;; Add new assigns to user-startup
(startup 'Wirenet'
(prompt '\nThere are some more assigns to be added to user-startup')
(help '\nThis will add the necessary new assigns your user-startup\n\n' @startup-help)
(command 'Assign Wirenet: ' InstallPath '\n')
(command 'Assign GUIs: C: ADD\n')
)
(run 'Assign GUIs: C: ADD')
;;;
;;; Fix trailing LF on Thor environment variables
(run 'setenv THOR/THORPath `getenv THOR/THORPath`')
(run 'setenv THOR/BBSDataPath `getenv THOR/BBSDataPath`')
(run 'Copy >NIL: ENV:THOR/#?path ENVARC:THOR')
;;;
;;; Copy C: files
(working 'Copying some files to C:')
(set CPath (tackon (pathonly @icon) 'C'))
(copyfiles
(prompt 'Copying new C commands')
(help '')
(source CPath)
(dest 'C:')
(all)
(nogauge)
)
;;;
;;; Copy AmiTCP: files
(working 'Updating Internet files')
(set TCPPath (tackon (pathonly @icon) 'AmiTCP'))
(working 'Copying new files')
(copyfiles
(prompt '')
(help '')
(source TCPPath)
(dest 'Wirenet:')
(all)
(nogauge)
)
; Set script bits in case they were cleared when unarcing
(protect 'Wirenet:bin/WirenetPrefs' '+s')
(protect 'Wirenet:bin/StopProc' '+s')
(protect 'Wirenet:bin/StopNet' '+s')
(protect 'Wirenet:bin/GetStatus' '+s')
(protect 'Wirenet:bin/Fetch' '+s')
(protect 'Wirenet:bin/Disconnect' '+s')
(protect 'Wirenet:bin/Connect' '+s')
(protect 'Wirenet:bin/AddLibs' '+s')
(protect 'Wirenet:bin/CheckOnline' '+s')
(protect 'Wirenet:bin/SendEvents' '+s')
(protect 'Wirenet:bin/ShowLog' '+s')
(protect 'Wirenet:bin/StartNet' '+s')
(protect 'Wirenet:bin/ParseThor' '+s')
(protect 'Wirenet:UserScripts/Stopnet' '+s')
(protect 'Wirenet:UserScripts/Startnet' '+s')
(protect 'Wirenet:UserScripts/PreSend' '+s')
(protect 'Wirenet:UserScripts/PreDisconnect' '+s')
(protect 'Wirenet:UserScripts/PreConnect' '+s')
(protect 'Wirenet:UserScripts/PostFetch' '+s')
(protect 'Wirenet:UserScripts/PostDisconnect' '+s')
(protect 'Wirenet:UserScripts/PostConnect' '+s')
(protect 'Wirenet:UserScripts/Function.B' '+s')
(protect 'Wirenet:UserScripts/Function.A' '+s')
;;;
;;; Delete old environment variables
(working 'Removing redundant files from ENVARC:')
(delete 'ENVARC:Wirenet/#?')
(delete 'ENVARC:Wirenet')
(delete 'ENVARC:DOMAINNAME')
(delete 'ENVARC:FTPDIR')
(delete 'ENVARC:FTPREADME')
(delete 'ENVARC:FTPSERVER')
(delete 'ENVARC:HOST')
(delete 'ENVARC:HOSTNAME')
(delete 'ENVARC:IPADDRESS')
(delete 'ENVARC:MAILBOX')
(delete 'ENVARC:MAILSERVER')
(delete 'ENVARC:MAILSERVERIP')
(delete 'ENVARC:NEWSSERVER')
(delete 'ENVARC:NEWSSERVERIP')
(delete 'ENVARC:NNTPSERVER')
(delete 'ENVARC:NODENAME')
(delete 'ENVARC:SMTPSERVER')
(delete 'ENVARC:USER')
(delete 'ENVARC:USERNAME')
;;;
;;; Show new docs and exit
(message FinalMsg)
(run 'Multiview AmiTCP/doc/Dashboard.guide')
(exit)
;;;